using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using TMPro;
using UnityEngine.UI;

public class Diary : MonoBehaviour
{

    [SerializeField] private Transform information;
    [SerializeField] private Transform memoirs;




    private void Update()
    {
        if (Input.GetKeyDown(KeyCode.Escape))
        {
            Close();
        }
    }


    public void Close()
    {
        Destroy(gameObject);
    }

    public void InformationActive()
    {
        if (!information.gameObject.activeSelf)
        {
            memoirs.gameObject.SetActive(false);
            information.gameObject.SetActive(true);
        }
    }

    public void MemoirsActive()
    {
        if (!memoirs.gameObject.activeSelf)
        {
            information.gameObject.SetActive(false);
            memoirs.gameObject.SetActive(true);
        }

    }
}
